﻿@using Razor.Models;
@model Razor.Models.Product[]

@{
    ViewBag.Title = "DemoArray";
}



<h1>枚举数组：</h1>
<small>使用@@using表达式</small>
@if (Model.Length > 0)
{
    <table>
        <thead><tr><th>Product</th><th>Price</th></tr></thead>
        <tbody>
            @foreach(Product item in Model)
            {
                <tr>
                    <td>@item.Name</td>
                    <td>@item.Price</td>
                </tr>
            }

        </tbody>
    </table>
}
else
{
    <h2>缺货了大哥</h2>
}
